﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;

using Hang.Blog.DomainPlus.Dtos;
using Hang.Blog.Dtos.Category;

using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace Hang.Blog.Inter {
    public interface IMenuAppService : IApplicationService {

        Task<IList<MenuDtos>> LoadHomeCategory();
         

        Task AddOrUpdate(MenuInsertOrUpdateDto category);


        Task Delete(Guid id);

        Task<PagedResultDto<MenuDto>> Page(MenuPageInputDto obj);


        Task<MenuDto> Get(Guid id); 

    }


    public class MenuPageInputDto : PageDto {
        public int PageIndex { get; set; }
        public int PageSize { get; set; }


        public string MenuName { get; set; }
    }


    public class MenuDto : FullAuditedEntityDto<Guid> {

        /// <summary>
        /// 父节点
        /// </summary>
        public Guid? ParentId { get; set; }


        public string ParentName { get; set; }


        //public new Guid Id { get; set; }

        /// <summary>
        /// 类目名称
        /// </summary>
        [StringLength(100)]
        public string  MenuName { get; set; }




        /// <summary>
        /// 全路径
        /// </summary>
        [StringLength(1000)]
        public string FullPath { get; set; }


        /// <summary>
        /// 全名字
        /// </summary>
        [StringLength(1000)]
        public string FullName { get; set; }


        public int Depth { get; set; }
    }
}
